"""Build drpc test"""


def scons():
    """Execute build"""
    Import('env')

    libs = ['daos_common', 'gurt', 'protobuf-c']

    denv = env.Clone()
    denv.AppendUnique(CFLAGS=['-std=gnu99'])
    denv.AppendUnique(CPPDEFINES=['TEST'])

    denv.require('protobufc')

    drpc_test = denv.d_program('drpc_test', ['drpc_test.c'], LIBS=libs)
    env.Install('$PREFIX/bin/', drpc_test)

    drpc_engine_test = denv.d_program('drpc_engine_test', ['drpc_engine_test.c'], LIBS=libs)
    env.Install('$PREFIX/bin/', drpc_engine_test)


if __name__ == "SCons.Script":
    scons()
